use super::awk_expr::*;
use super::awk_stat::*;

#[derive(Debug, Clone)]
pub enum Pattern {
    Begin,                    // BEGIN pattern
    End,                      // END pattern
    Regex(String),           // /regex/ pattern
    Expression(Expr),        // Expression pattern: $2 > 30
}

#[derive(Debug, Clone)]
pub struct AwkRule {
    pub pattern: Option<Pattern>,    // None means the rule always executes
    pub action: Vec<Statement>,      // Statements to execute when pattern matches
}

#[derive(Debug, Clone)]
pub struct Program {
    pub rules: Vec<AwkRule>,           // All rules in the program
}